/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.umss.arqui10.modelo;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.TreeMap;

/**
 *
 * @author rho1and0
 */
class AccomplishedService extends Service implements Serializable {

    /*
     * OutputBean is a goods
     * Integer is a quantity
     */
    private List<UsedOutputBean> goods;

    AccomplishedService(Service serv) {
        super(serv.getId(), serv.getName(), serv.getDescription());
        this.goods = new LinkedList<UsedOutputBean>();
        if(!super.goods.isEmpty())
            for(OutputBean good : super.goods)
                this.goods.add(new UsedOutputBean(good, 0));
    }

    List<UsedOutputBean> getUsedGoods() {
        return goods;
    }

    void addGoods(UsedOutputBean good) {
        this.goods.add(good);
    }

    @Override
    public String toString() {
        return ""+this.getName()
                +", "+this.getDescription();
//                +", "+super.price.getCurrentPrice().longValue();
    }
}
